package com.iptv.grape.event.imp;

import com.iptv.grape.BaseActivity;
import com.iptv.grape.bu.GrapeContext;
import com.iptv.grape.event.JSRequest;
import com.iptv.grape.event.proc.IWebViewMessageProc;
import com.iptv.grape.video.XMediaPlayer;

public class KillWindowProc implements IWebViewMessageProc {

    @Override
    public void init(JSRequest jsRequest) {

    }

    @Override
    public String procMessage(BaseActivity baseActivity, XMediaPlayer mediaPlayer) {

        mediaPlayer.stop();

        GrapeContext.curGrapeContext().removeVodFragment(baseActivity);
        baseActivity.finish();
        return "";
    }
}
